package com.imti.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imti.entity.DepSys;
import com.imti.entity.dto.DepSysDto;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * 科室系统表(DepSys)表数据库访问层
 *
 * @author makejava
 * @since 2023-02-03 13:59:19
 */
@Mapper
public interface DepSysDao extends BaseMapper<DepSys> {

    @Select("<script>"+
            "select  distinct ds.dep_sys_id,ds.dep_sys_name from dep_sys ds ,desk_work dw"+
            "<if test='searchName!=null and searchName!=\"\"'>"+
            " where ds.dep_sys_id=dw.dep_sys_id"+
            " and dw.desk_name like concat('%',#{searchName},'%')"+
            "</if>"+
            "</script>"
    )
    public List<DepSysDto> findDepsysDeskwork(String searchName);

}

